# 1:算数运算符
a = 10
b = 3
print(a + b)  # 加
print(type(a + b))
print(a - b)  # 减
print(type(a - b))
print(a * b)  # 乘
print(type(a * b))
print(a / b)  # 除
print(type(a / b))
print(a // b)  # 整除
print(type(a // b))
print(a % b)  # 取余
print(type(a % b))
print(a ** b)  # 幂运算
print(type(a ** b))

# 2:赋值运算符
a = 10
a += 3  # a=a+3
print(a)
a -= 3  # a=a-3
print(a)
a *= 3  # a=a*3
print(a)
a /= 3  # a=a/3
print(a)

# 3:比较运算符
a = 10
b = 3
print(a > b)  # 大于
print(a < b)  # 小于
print(a >= b)  # 大于等于
print(a <= b)  # 小于等于
print(a == b)  # 相等
print(a != b)  # 不相等
print(a is b)  # 相同
print(a is not b)  # 不相同

# 4:成员运算符
print("---------------开始打印成员运算符-----------------")
a = [1, 2, 3]
print(1 in a)
print(4 not in a)
print(1 in range(1, 10))  # 判断1是否在1到10之间
print(1 not in range(1, 10))  # 判断1是否不在1到10之间
print(1 in dir(a))  # dir() 函数返回对象的属性
print(1 not in dir(a))  # dir()函数返回对象的属性
print(dir(a))
